<template>
  <div>
    <el-select v-model="$i18n.locale" size="mini" style="width: 80px">
      <el-option :disabled="$i18n.locale === 'zh'" label="中文" value="zh" />
      <el-option :disabled="$i18n.locale === 'en'" label="En" value="en" />
    </el-select>
  </div>
</template>

<script>
export default {
  watch: {
    '$i18n.locale': function() {
      this.$message.success('修改语言成功')
      localStorage.setItem('lang', this.$i18n.locale)
    }
  }
}
</script>

<style>

</style>
